package com.kexio.enterprise.observability.tracing.domain;

import com.kexio.enterprise.observability.tracing.enums.SpanStatus;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * Span信息
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class SpanInfo {
    private String spanId;
    private String parentSpanId;
    private String operationName;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    private long duration;
    private SpanStatus status;
    private Map<String, String> tags;
    private List<SpanLog> logs;

    // Getters and Setters
    public String getSpanId() { return spanId; }
    public void setSpanId(String spanId) { this.spanId = spanId; }
    
    public String getParentSpanId() { return parentSpanId; }
    public void setParentSpanId(String parentSpanId) { this.parentSpanId = parentSpanId; }
    
    public String getOperationName() { return operationName; }
    public void setOperationName(String operationName) { this.operationName = operationName; }
    
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public LocalDateTime getEndTime() { return endTime; }
    public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
    
    public long getDuration() { return duration; }
    public void setDuration(long duration) { this.duration = duration; }
    
    public SpanStatus getStatus() { return status; }
    public void setStatus(SpanStatus status) { this.status = status; }
    
    public Map<String, String> getTags() { return tags; }
    public void setTags(Map<String, String> tags) { this.tags = tags; }
    
    public List<SpanLog> getLogs() { return logs; }
    public void setLogs(List<SpanLog> logs) { this.logs = logs; }
}
